<?php

namespace App\Entity;

use ApiPlatform\Core\Annotation\ApiResource;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ApiResource()
 * @ORM\Entity(repositoryClass="App\Repository\SarsUserLogRepository")
 */
class SarsUserLog
{
    /**
     * @ORM\Id()
     * @ORM\GeneratedValue()
     * @ORM\Column(type="integer")
     */
    private $id;

    /**
     * @ORM\Column(type="string", length=255)
     */
    private $shenfenzhenghao;

    /**
     * @ORM\Column(type="string", length=255, nullable=true)
     */
    private $tiwen;

    /**
     * @ORM\Column(type="string", length=255, nullable=true)
     */
    private $zhengzhuang;

    /**
     * @ORM\Column(type="string", length=255, nullable=true)
     */
    private $riqi;

    /**
     * @ORM\ManyToOne(targetEntity="App\Entity\SarsUser", inversedBy="logs",fetch="EAGER")
     * @ORM\JoinColumn(nullable=false)
     */
    private $user;

    public function getId(): ?int
    {
        return $this->id;
    }

    public function getShenfenzhenghao(): ?string
    {
        return $this->shenfenzhenghao;
    }

    public function setShenfenzhenghao(string $shenfenzhenghao): self
    {
        $this->shenfenzhenghao = $shenfenzhenghao;

        return $this;
    }

    public function getTiwen(): ?string
    {
        return $this->tiwen;
    }

    public function setTiwen(?string $tiwen): self
    {
        $this->tiwen = $tiwen;

        return $this;
    }

    public function getZhengzhuang(): ?string
    {
        return $this->zhengzhuang;
    }

    public function setZhengzhuang(?string $zhengzhuang): self
    {
        $this->zhengzhuang = $zhengzhuang;

        return $this;
    }

    public function getRiqi(): ?string
    {
        return $this->riqi;
    }

    public function setRiqi(?string $riqi): self
    {
        $this->riqi = $riqi;

        return $this;
    }

    public function getUser(): ?SarsUser
    {
        return $this->user;
    }

    public function setUser(?SarsUser $user): self
    {
        $this->user = $user;

        return $this;
    }
}
